﻿/**
 * File:   json_builder.h
 * Author: AWTK Develop Team
 * Brief:  create json
 *
 * Copyright (c) 2018 - 2020  Guangzhou ZHIYUAN Electronics Co.,Ltd.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * License file for more details.
 *
 */

/**
 * History:
 * ================================================================
 * 2020-12-27 zhang zhongji <zhangzhongji@zlg.cn> created
 *
 */

#ifndef JSON_BUILDER_H
#define JSON_BUILDER_H

#include "tkc/types_def.h"
#include "aidl_defines.h"

BEGIN_C_DECLS

/**
 * @method json_builder_create
 * 生成json构造器。
 *
 * @return {builder_t*} json构造器，返回非NULL表示成功，否则表示失败。
 */
builder_t* json_builder_create();

/**
 * @method json_builder_get_result
 * 获取转换后的结果。
 *
 * @return {builder_t*} json构造器，返回非NULL表示成功，否则表示失败。
 */
char* json_builder_get_result(builder_t* builder);

/**
 * @method json_builder_destroy
 * 清理资源。
 * @param {builder_t*} builder json构造器。
 *
 * @return {ret_t} 返回RET_OK表示成功，否则表示失败。
 */
ret_t json_builder_destroy(builder_t* builder);


END_C_DECLS

#endif /*JSON_BUILDER_H*/
